package com.weichen.studentgameexchange.strategy.feign;

import com.weichen.studentgameexchange.member.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

// MemberFeignClient.java (game模块)
@FeignClient(name = "member-service", url = "http://localhost:8000") // 确保端口与member模块一致
public interface MemberFeignClient {

    @GetMapping("/member/{userId}")
    User getUserById(@PathVariable("userId") Long userId); // 明确指定参数名

    @PostMapping("/member/add/batch")
    List<User> getUsersByIds(@RequestBody List<Long> userIds);

    @GetMapping("/member/getUserId")
    User getUserId(@RequestParam("username") String username);
}
